package com.example.blue_plugin.desgin;


import com.example.blue_plugin.DevNiaoYe;
import com.example.blue_plugin.DevXueYang;

import java.util.HashMap;

public class SdkManager {
    static HashMap<SdkTypeEnum, BaseSDK> map = new HashMap<>();
    static {
        map.put(SdkTypeEnum.DevNiaoYe, new DevNiaoYe());
        map.put(SdkTypeEnum.DevXueYang, new DevXueYang());
    }

    private static final SdkManager instance = new SdkManager();

    public static SdkManager getInstance() {
        return SdkManager.instance;
    }

    public BaseSDK getSdkObj(SdkTypeEnum sdkType) {
        if (sdkType == null) {
            return null;
        }
        return map.get(sdkType);
    }

}
